﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageSERIX.Master" AutoEventWireup="true"
    CodeBehind="AlterarSituacaoRME.aspx.cs" Inherits="SERIX.AlterarSituacaoRME" Title="Alterar Situação do RME" %>

<%@ Register Src="Controles/lovGenerica.ascx" TagName="lovGenerica" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div align="center">
        <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
            <tr>
                <td width="100%" class="secao_titulo">
                    <span style="color: black">
                        Fechar Lançamento Mensal<hr class="linhahorizontal" style="width: 740px" />
                </td>
            </tr>
            <tr>
                <td align="left" class="erro">
                    <asp:Label ID="lblErro" runat="server" CssClass="erro" Text="*Erro: " Visible="False"
                        Width="740px" TabIndex="-1" onload="lblErro_Load"></asp:Label>
                </td>
            </tr>
        </table>
        <asp:UpdatePanel ID="UpdatePanelFiltro" runat="server">
            <ContentTemplate>
                <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
                    <tr>
                        <td align="left" class="erro">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td class="grid_titulo_right" style="color: black;" width="25%">
                                        Mês&nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                    <td class="grid_celula" style="height: 30px">
                                        <asp:TextBox ID="txtAno" Columns="4" MaxLength="4" runat="server" OnPreRender="txtAno_PreRender"></asp:TextBox>
                                        <span style="color: black" class="grid_celula">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="ddlMeses"
                                                CssClass="erro_pesquisa" ErrorMessage="*Campo obrigatório!" Display="Dynamic"
                                                TabIndex="-1" Width="174px"></asp:RequiredFieldValidator>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="grid_titulo_right" style="color: black;" width="25%">
                                        Ano&nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                    <td class="grid_celula" style="height: 30px">
                                        <asp:DropDownList ID="ddlMeses" runat="server" OnPreRender="ddlMeses_PreRender">
                                            <asp:ListItem />
                                            <asp:ListItem Value="1" Text="Janeiro"></asp:ListItem>
                                            <asp:ListItem Value="2" Text="Fevereiro"></asp:ListItem>
                                            <asp:ListItem Value="3" Text="Março"></asp:ListItem>
                                            <asp:ListItem Value="4" Text="Abril"></asp:ListItem>
                                            <asp:ListItem Value="5" Text="Maio"></asp:ListItem>
                                            <asp:ListItem Value="6" Text="Junho"></asp:ListItem>
                                            <asp:ListItem Value="7" Text="Julho"></asp:ListItem>
                                            <asp:ListItem Value="8" Text="Agosto"></asp:ListItem>
                                            <asp:ListItem Value="9" Text="Setembro"></asp:ListItem>
                                            <asp:ListItem Value="10" Text="Outubro"></asp:ListItem>
                                            <asp:ListItem Value="11" Text="Novembro"></asp:ListItem>
                                            <asp:ListItem Value="12" Text="Dezembro"></asp:ListItem>
                                        </asp:DropDownList>
                                        <span style="color: black" class="grid_celula">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtNomeTecnico"
                                                CssClass="erro_pesquisa" ErrorMessage="*Campo obrigatório!" Display="Dynamic"
                                                TabIndex="-1" Width="174px"></asp:RequiredFieldValidator>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="grid_titulo_right" style="color: black;" width="25%">
                                        Técnico&nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                    <td class="grid_celula" style="height: 30px">
                                        <asp:TextBox ID="txtNomeTecnico" runat="server" Columns="40" MaxLength="60" Enabled="false"></asp:TextBox>
                                        <uc1:lovGenerica ID="lovTecnicos" runat="server" />
                                        <span style="color: black" class="grid_celula">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddlMunicipios"
                                                CssClass="erro_pesquisa" ErrorMessage="*Campo obrigatório!" Display="Dynamic"
                                                TabIndex="-1" Width="174px"></asp:RequiredFieldValidator>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="grid_titulo_right" style="color: black;" width="25%">
                                        Município&nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                    <td class="grid_celula" style="height: 30px">
                                        <asp:DropDownList ID="ddlMunicipios" runat="server" DataSourceID="SqlMunicipios"
                                            DataTextField="NOME_MUN" DataValueField="IDT_MUN" AutoPostBack="True" 
                                            onselectedindexchanged="ddlMunicipios_SelectedIndexChanged">
                                        </asp:DropDownList>
                                        <asp:SqlDataSource ID="SqlMunicipios" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                                            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT  B.IDT_MUN, B.NOME_MUN FROM Serix.SRX_LOTACOES_TECNICOS A JOIN Serix.SRX_MUNICIPIOS B ON (A.IDT_TEC = :PARAM AND A.IDT_MUN = B.IDT_MUN AND A.STA_LOTACAO = 'A') ORDER BY NOME_MUN ">
                                            <SelectParameters>
                                                <asp:Parameter Name="PARAM" />
                                            </SelectParameters>
                                        </asp:SqlDataSource>
                                        <span style="color: black" class="grid_celula">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlMunicipios"
                                                CssClass="erro_pesquisa" ErrorMessage="*Campo obrigatório!" Display="Dynamic"
                                                TabIndex="-1" Width="174px"></asp:RequiredFieldValidator>
                                        </span>
                                    </td>
                                </tr>                                
                                <tr>
                                    <td class="grid_titulo_right" style="color: black;" width="25%">
                                        Programa&nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                    <td class="grid_celula" style="height: 30px">
                                        <asp:DropDownList ID="ddlProgramas" runat="server" AutoPostBack="True" 
                                            DataSourceID="SqlProgramas" DataTextField="NOM_PROG" DataValueField="IDT_PROG" 
                                            onselectedindexchanged="ddlProgramas_SelectedIndexChanged">
                                        </asp:DropDownList>
                                        <span class="grid_celula" style="color: black">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                                            ControlToValidate="ddlProgramas" CssClass="erro_pesquisa" Display="Dynamic" 
                                            ErrorMessage="*Campo obrigatório!" TabIndex="-1" Width="174px"></asp:RequiredFieldValidator>
                                        </span>
                                        <asp:SqlDataSource ID="SqlProgramas" runat="server" 
                                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                                            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT P.IDT_PROG, P.NOM_PROG FROM SERIX.SRX_PROGRAMAS P 
      JOIN SERIX.SRX_PROGRAMAS_MUNICIPIOS PM ON (P.IDT_PROG = PM.IDT_PROG)
WHERE PM.IDT_MUN = :P_IDT_MUN
ORDER BY P.NOM_PROG
">
                                            <SelectParameters>
                                                <asp:Parameter Name="P_IDT_MUN" />
                                            </SelectParameters>
                                        </asp:SqlDataSource>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="grid_titulo_right" style="color: black;" width="25%">
                                        Situação&nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                    <td class="grid_celula" style="height: 30px">
                                        <asp:Label ID="lblSituacao" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" class="erro">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
            <tr __designer:mapid="56">
                <td colspan="2" style="height: 30px; color: black;" width="25%" __designer:mapid="57"
                    align="center">
                    <asp:Button ID="Ok_Button" runat="server" Font-Bold="True" Text="Alterar" Width="80px"
                        OnClick="Ok_Button_Click" />
                    &nbsp;<asp:Button ID="Cancelar_Button" runat="server" Font-Bold="True" OnClick="Cancelar_Button_Click"
                        Text="Cancelar" Width="80px" CausesValidation="False" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
